import request from '@/utils/request'

// 查询房间和契约关系列表
export function listRoomContract(query) {
  return request({
    url: '/lease/RoomContract/list',
    method: 'get',
    params: query
  })
}

// 查询房间和契约关系详细
export function getRoomContract(contractId) {
  return request({
    url: '/lease/RoomContract/' + contractId,
    method: 'get'
  })
}

// 新增房间和契约关系
export function addRoomContract(data) {
  return request({
    url: '/lease/RoomContract',
    method: 'post',
    data: data
  })
}

// 修改房间和契约关系
export function updateRoomContract(data) {
  return request({
    url: '/lease/RoomContract',
    method: 'put',
    data: data
  })
}

// 删除房间和契约关系
export function delRoomContract(contractId) {
  return request({
    url: '/lease/RoomContract/' + contractId,
    method: 'delete'
  })
}
